tsteven4 [Wed, 13 Mar 2019 22:15:25 +0000 (16:15 -0600)]
fiddle with nmea waypoint status tracking. (#325)
Traditionally nmea looks at the Waypoint data member Q
to decide if the Waypoint has been added on to a global list, and
if it has not it deletes the Waypoint so we don't leak memory.
This is problematic when we change the waypoint lists so queues
aren't used.
To overcome this difficulty nmea now uses a derived class of
Waypoint that tracks if the Waypoint has been added or not.
tsteven4 [Wed, 13 Mar 2019 17:13:07 +0000 (11:13 -0600)]
fix stackfilter issues. (#324)
1. correct defect in the new RouteList::swap method.
2. correct an old bug in stackfilter that cleaned up
waypts on exit, but not routes or tracks.
3. enhance stackfilter test to test routes and tracks as well
as waypts.
tsteven4 [Sat, 9 Mar 2019 16:44:04 +0000 (09:44 -0700)]
clean up gui main and fix a png. (#313)
* clean up gui main and fix a png.
- fix libpng warning: iCCP: known incorrect sRGB profile
issue with runit.png with pngcrush.
- fix includes for gui/main.cc, including removal of
CoreFoundation.h
- use QApplication static methods instead of going directly
to the underlying QCoreApplication static methods.
- no path setting in GUI, instead pass the full path to gpsbabel when using QProcess::start.
in formatload.cc xlt() use qt methods to get a char* instead of
resorting to stdlib. At this point Qt assumes all translate strings
are utf8. However, the formatload xlt intent doesn't work because
1) MainWindow::LoadLanguage hasn't been called when
MainWindow::loadFormats is called.
2) the translations don't exist for the format bits from gpsbabel
that fromatload tries to translate. I think this was the intent
of the gpsbabel_*.ts files which are very out of date and no
longer distributed.
tsteven4 [Thu, 28 Feb 2019 14:14:13 +0000 (07:14 -0700)]
Refactor application packaging for linux/macos. (#310)
* Refactor application packaging for linux/macos.
Packaging of the GUI for linux/macos can now be done
either by building the make target "package" created by
"qmake app.pro", or by executing a bash script "package_app".
Packaging with the legacy configure flow will build the
package target.
Travis CI scripts will build the package target.
The obsolete script mac-localize is deleted. This
functionality is included in package_app.
The obsolete script makelinuxdist.sh is deleted. We have not
distributed a linux package in some time. Furthermore this
scirpt hadn't worked in some time. package_app does not
create a standalone linux app, however it packages all the
bits from GPSBabel in GPSBabelFE. This makes creating a
Docker app, which includes the Qt installation, for GPSBabel easy.
Merge relevant Qt .qm files into one qt_xx.qm file for each language
as recommended by Qt.
Deploy these meged .qm files with linux/macos builds.
Since Qt5 we only deployed the meta catalog, but not it's
dependencies. This should have led to the dependencies not
being available without Qt being installed.
gpsbabel.qm and gpsbabelfe.qm are no longer included in the packaged
apps for windows/linux/macos, as it should be.
tsteven4 [Wed, 27 Feb 2019 14:25:14 +0000 (07:25 -0700)]
Object cleanup (#307)
* elminiate some early program exits.
exits without cleanup make it harder to find memory leaks.
fix a few leaks.
enhance random format to support reading real time position data.
correct some sign related warnings.
* use invariant generator for random format.
* make compilers happy with random.
clang doesn't like:
random.cc:61:42: note: read of non-constexpr variable 'generator' is not allowed in a constant expression
constexpr double scalefactor = 1.0 / (*generator).max();
tsteven4 [Thu, 21 Feb 2019 17:13:17 +0000 (10:13 -0700)]
Qt 5.12.1 and valgrind on Linux (#306)
set an environmental variable when running valgrind to disable QRegularExpressions use of JIT which causes problems for valgrind. The release build of Qt 5.12.1 uses JIT by default. The debug build does not.
warn when running older version of valgrind that don't handle RDRAND instructions used by newer versions of Qt such as 5.12.1.
tsteven4 [Thu, 14 Feb 2019 13:35:27 +0000 (06:35 -0700)]
Relocate xcsv format functions. (#297)
Many funtions for the xcsv format were in csv_util.cc
instead of xcsv.cc. This commit moves the xcsv format
specific functions to xcsv.cc, and leaves the possibly
shared utility functions in csv_util.cc.
xcsv.h is added to communicate shared xcsv style handling
with vecs.cc.
BJ Kowalski [Tue, 12 Feb 2019 20:38:41 +0000 (14:38 -0600)]
Added support for USR version 5 and 6 and corrected USR version 4 support. (#268)
* Minor changes to address GCC 7.3.0 warnings generated by flag -Wunused-but-set-variable.
Moved declaraions/initialization of rp_backup and era inside #ifdef _NL_CURRENT conditionals.
* Added { ... } to for at the end of zip64local_SearchCentralDir() so that if-break statements inside for loop.
* Removed declaration and commented out references to startlat, startlon, and starttime in fit_parse_data() due to GCC 7.3.0 warning from
flag -Wunused-but-set-variable.
* Added initial support for Lowrance USR 5 and 6 formats.
* Significant changes to handle multiple USR4 versions and add USR5 and USR6 support.
* Remove extraneous debug NL when no debug specified.
* Updated USR4 reference file because of increased accuracy in converting lat/log values.
* Documentation on some ICON mappings.
* Added USR5 and USR6 to validation checks.
* Added reference files for USR5 and USR6 formats.
* Cleaned up some debug output.
* Continued work to consolidate all Lowrance USR processing into a single file.
* Eliminated lowranceusr4.cc and restuctured testing to include USR4, USR5, and USR6 formats.
* Changes associated with adding support for USR 5 and USR 6.
* Eliminated lowranceusr4.cc from build.
* Changed default Output USR Version from 4 to 2 for backward compatibilty.
* Removed USR 4 section from documentation.
* Initial update of XMLDOC for updated data formats.
* iMinor updates to parse_routes. Added correct v4 and v5 GPX reference files.
* Documentation updates to reflect new capabilities.
* Added Route element information to document and minor code changes to match.
* Doc refinement with rewrite.
* Corrections to USR 4 output.
* Update to correct v4 gpx file.
* Checkin correct v5 gpx file.
* Removed errant NL when no debug specified.
* Resolved conflicts
* Missed this update.
* Revert "Minor changes to address GCC 7.3.0 warnings generated by flag -Wunused-but-set-variable."
at the request of tsteven4 as they have nothing to do with the expanded support.
* Revert "Added { ... } to for at the end of zip64local_SearchCentralDir() so that if-break statements inside for loop."
at the request of tsteven4 as they have nothing to do with the expanded support.
* Revert "Removed declaration and commented out references to startlat, startlon, and starttime in fit_parse_data() due to GCC 7.3.0 warning from"
at the request of tsteven4 as they have nothing to do with the expanded support.
* Updated to remove lowranceusr4.cc per suggestion from tsteven4 to support cmake/XCLion.
* Per suggestions from tsteven4
- deleted define SECSTORADIANS as it was not used
- ran astylerc
* Replaced use of NULL with nullptr per tsteven4 suggestion.
* Added URLs for reference information.
* Adopted tsteven4 recommendation on eliminating compiler warning.
* Corrections to Waypoint and Trail documentation for USR 4, 5, and 6 formats.
* Address Codacy flagged issues.
* Address Codacy flagged issues.
* Address additional Codact flaged issues.
* Changed DEGREESTORADIANS define from hardcoded value to use (M_PI/180.0)
* Removed Copyright protected material and replaced with authored comments.
* Corrected altitude/depth retension coverting USR4/5/6 to USR2/3
* Added mapping of USR4/5/6 ICON numbers to text to support output to USR 2/3 format.
* Corrected generation of USR4 data file.
* Check for NULL format specific when converting USR 2/3 (colorless) to USR4 (color coded) ICONs.
* Added cases where USR 2/3 embeds color in shortname.
* Corrections to ICON translation from USR v2/3 to USR 4.
* Cleanup USR 2/3 parsing debug.
* Adopted modificatins to USR 4/5/6 time interpretation per suggestion from tsteven4.
* Adopted modificatins to USR 4/5/6 time interpretation per suggestion from tsteven4.
* Changed file header parsing back to int16 for USR format as found sample file with a stream version other than 0. Assume this
is true for ALL USR formats until determine otherwise.
* Updated reference files after corrections to altitude and time conversion.
* Check for both "nan" and "-nan" to address compiler differences.
* Use -options instead of --options to avoid osx OS issues.
* Set altitude to "unknown_alt" when creating Waypoints from Event ICONs.
Updated reference files to encorporate "unknown_alt" change.
Corrected mis-spelling of "green"
* Change cut options from --compliment to legacy explict field list for OSX OS support.
* Applied codex patch from tsteven4 - thank you.
* Corrected interpretation of elevation in USR2/3.
* Corrected reference files and test script with changes to elevation interpretation.
* More conversions to QString conventions.
Minor correction to trail attribute parsing.
* Editorial cleanup.
* USRv6 uses trail data stream version 5 which employs int32 rather than char for attributes.
* Use invalid ICON value as method to detect HOOK2 generated USR 2/3 files.
tsteven4 [Sat, 9 Feb 2019 22:36:23 +0000 (15:36 -0700)]
bug fixes for xcsv reader. (#295)
For some lines data must be accumulated from several fields
in arbitrary field order.
Previously this was done with global variables. Now a variable to
hold the accumulated data for a line is constructed/destructed for
each line.
This eliminates the possiblity of unintended communication between
lines.
This also eliminated some unintended communication between the reader
and the writer through global variables that they previously shared
(csv_track, csv_route).
An ordering sensitivty to TRACK_NEW and TRACK_NAME is removed.
For the reader, conditional allocation of route_heads is removed
from xcsv_parse_val, and centralized in xcsv_data_read.
This eliminates some undetected
memory leaks which hid as "still reachable" due to the pointer
being saved in a global variable (csv_track, csv_route).
Undesirable reading of the route_head->Q variable is
eliminated improving encapsulation. I beleive the intent was
never to decide if the csv_track->Q was empty, i.e. it hadn't been
added to the global track_head yet. I beleive what was desired was
to decide if csv_track had any waypoints. In any event the
centralization of route_head allocation and head addition makes new
track handling much more straight forward and robust.
The xcsv test case is enhanced to increase coverage.
tsteven4 [Sat, 9 Feb 2019 21:59:09 +0000 (14:59 -0700)]
Introduce a RouteList class.
This is backed by a QueueList class, which
adds iterators for queues. It is anticipated that
this will be replaced by usage of a more standard
container.
tsteven4 [Sat, 2 Feb 2019 22:41:52 +0000 (15:41 -0700)]
Mac5120 (#283)
* add generic qt installer for osx.
add travis builds with osx and qt 5.9.7, 5.12.0
update qtci extract-qt-installer from upstream.
add some error detection and debug to travis_install_osx, travis_intall_linux_local.
* catch qtci/install-qt up with upstream.
* try harder with early extract-qt-installer bugs on osx.
Martin Buck [Tue, 13 Nov 2018 22:58:43 +0000 (23:58 +0100)]
Start new track segments on timer start events
Insert track segment separators when encountering a timer start event in a
FIT file (usually caused by manually pushing the start button). This way,
pauses in a FIT file don't appear as continuous tracks.
Also adapt reference tracks by adding suitable <trkseg> tags to please "make
check"/testo.